package b4.controller
{
	import b4.ApplicationFacade;
	import b4.model.TownProxy;
	import b4.model.ResourceLoader;
	import b4.model.vo.player.Role;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	public class EnterTownCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification):void
		{
			var townProxy:TownProxy = facade.retrieveProxy(TownProxy.NAME) as TownProxy;
			sendNotification(ApplicationFacade.LOAD_TOWN_RESOURCE, {type: ResourceLoader.TYPE_TOWN, townIndex: townProxy.vo.town.townIndex});
		}
	}
}